<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>image-mosaic</title>
    <style>
        .image-mosaic {
            display: grid;
            gap: 1rem;
            grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
            grid-auto-rows: 240px;
        }
        .card {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background-color: #353555;
            font-size: 3rem;
            color: #fff;
            height: 100%;
            width: 100%;
            border-radius: 4px;
            transition: all 500ms;
            overflow: hidden;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            margin: 0;
            padding: 0;
            box-shadow: rgba(3,8,20,.1) 0px .15rem .5rem,rgba(2,8,20,.1) 0px 0.075rem .175rem;
        }
        @media screen and (min-width: 600px) {
            .card-tall {
                grid-row: span 2 / auto;
            }
            .card-wide {
                grid-column: span 2 / auto;
            }
        }
    </style>
</head>
<body>
    <div class="image-mosaic">
        <div class="card card-tall card-wide" style="background-image: url('https://www.eveningwater.com/img/segmentfault/1.png');"></div>
        <div class="card card-tall" style="background-image: url('https://www.eveningwater.com/img/segmentfault/2.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/3.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/4.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/5.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/6.png');"></div>
        <div class="card card-wide" style="background-image: url('https://www.eveningwater.com/img/segmentfault/6.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/7.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/8.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/9.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/10.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/11.png');"></div>
        <div class="card" style="background-image: url('https://www.eveningwater.com/img/segmentfault/12.png');"></div>
    </div>
</body>
</html>